package com.study.designmodes.service.liabilityChain.v5;

import com.study.designmodes.service.liabilityChain.v5.handler.CouponOrderHandler;
import com.study.designmodes.service.liabilityChain.v5.handler.OrderBaseHandler;
import com.study.designmodes.service.liabilityChain.v5.handler.SalesOrderHandler;
import com.study.designmodes.service.liabilityChain.v5.handler.VipOrderHandler;
import lombok.Data;
import org.assertj.core.util.Lists;

import java.util.List;

/**
 * 订单请求参数
 *
 * @author yangyanbin
 * @date 2023/06/13
 * @since 20230613
 */
@Data
public class OrderRequestParam {


    /**
     * 订单没有
     */
    private String orderNo;


    /**
     * 售价
     */
    private Double amount;


    /**
     * vip登记
     */
    private Integer vipLevel;


    /**
     * 优惠券
     */
    private String couponNo;


    /**
     * 处理类名称
     */
    private List<Class<?>> spuDetailHandlerClazz;

    public void defaultHandler() {
        this.spuDetailHandlerClazz =
                Lists.newArrayList(
                        //基础商品详情
                        OrderBaseHandler.class,
                        // 折扣
                        SalesOrderHandler.class,
                        // 优惠券
                        CouponOrderHandler.class,
                        // vip
                        VipOrderHandler.class

                );
    }
}
